<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org"
	xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
<title>任务中心首页</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="../sources/bootstrap/css/bootstrap.min.css" />
<script src="../sources/bootstrap/js/jquery-2.1.1.min.js"></script>
<script src="../sources/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript">
	$(function() {
		$($("#initButton").val()).click();
	});

	function navChange(url, id) {
		$.ajax({
			url : url,
			async : true,
			timeout : 90000,
			type : "GET",
			success : function(data) {
				$("#contentTable").html(data);
				$("li").each(function(){
				    $(this).removeClass("active");
				});
				$("#"+id).attr("class", "active");
			},
			dataType : "html",
			error : function() {

			}
		});
	}
</script>
</head>
<body>
	<input type="hidden" th:value="${initButton}" id="initButton" />
	<nav class="navbar navbar-default" style="margin-bottom: 0px;">
		<div class="container-fluid">
			<div class="navbar-header">
				<a class="navbar-brand" href="javascript:void(0)">定时任务中心</a>
			</div>
		</div>
	</nav>
	<div class="row">
		<div class="col-md-1">
			<ul class="nav nav-pills nav-stacked">
				<li id="taskli" role="presentation"><a id="task"
					href="javascript:void(0)"
					onclick="navChange('/task/index','taskli')">任务</a></li>
				<li id="actuatorli" role="presentation"><a id="actuator"
					href="javascript:void(0)"
					onclick="navChange('/actuator/index','actuatorli')">执行器</a></li>
				<li id="projectli" role="presentation"><a id="project"
					href="javascript:void(0)"
					onclick="navChange('/project/index','projectli')">项目</a></li>
				<li id="taskResultli" role="presentation"><a id="taskResult"
					href="javascript:void(0)"
					onclick="navChange('/taskResult/index','taskResultli')">执行结果</a></li>
				<li id="sysConfigli" role="presentation"><a id="sysConfig"
					href="javascript:void(0)"
					onclick="navChange('/sysConfig/index','sysConfigli')">系统参数</a></li>
			</ul>
		</div>
		<div id="contentTable" class="col-md-10"></div>
	</div>
</body>
</html>
